package com.exercise.widgets.settings

import android.content.Context
import android.content.Intent
import android.os.Bundle
import android.view.LayoutInflater
import androidx.activity.enableEdgeToEdge
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
import com.exercise.struct.base.BaseActivity
import com.exercise.struct.viewmodel.BaseViewModel
import com.exercise.widgets.R
import com.exercise.widgets.databinding.ActivityPreferenceBinding

class PreferenceActivity : BaseActivity<BaseViewModel, ActivityPreferenceBinding>() {
    override val bindingInflater: (LayoutInflater) -> ActivityPreferenceBinding
        get() = ActivityPreferenceBinding::inflate
    override val modelClass: Class<BaseViewModel>
        get() = BaseViewModel::class.java

    override fun initData() {
    }

    override fun initView() {
        supportFragmentManager
            .beginTransaction()
            .replace(R.id.container, PreferenceFragment())
            .commit()
    }

    companion object {
        fun start(context: Context) {
            Intent(context,PreferenceActivity::class.java).also {
                context.startActivity(it)
            }
        }
    }


}